<?php
namespace app\index\model;
use frame\app\Model;
use frame\lib\Db;

class User extends Model{
    public static function list($query = [])
    {
        $uid = $_SESSION['user']['id'];
        if(!empty($query['username']) || !empty($query['imei'])){
            $list = Db::name('user')->where(['user_id' => $uid ,'delete_time' => 0])->like($query)->select();
        }else{
            $list = Db::name('user')->where(['user_id' => $uid,'delete_time' => 0])->select();
        }
        return $list;
    }
   
}